<div id="app">
    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
        :current-page.sync="currentPage" :page-size="30" layout="total, prev, pager, next" :total="total">
    </el-pagination>
</div>
<style>
    #app {
        text-align: center;
    }

</style>
<script>
    new Vue({
        el: '#app',
        data: function () {
            return {
                visible: false,
                currentPage: 1,
                total: 30
            }
        },
        beforeCreate: function () {
            this.total = sessionStorage.getItem('total')
        },
        methods: {
            handleSizeChange(val) {
                console.log(`每页 ${val} 条`);
            },
            handleCurrentChange(val) {
                console.log(`当前页: ${val}`);
                sessionStorage.setItem('pageNo', val)
            }
        },
    })

</script>
